<div class="title-bar">
    <h5>活动数: {{ activities?.length }}</h5>
</div>

<div class="main">

    <table class="table hover">

        <thead>
            <tr>
                <th>活动名称</th>
                <th>活动起止</th>
                <th>创建用户</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>

        <tbody>
            <tr *ngFor="let activity of activities">
                <td>
                    {{activity.activityName || '-'}}
                </td>
                <td>{{activity.startTime | date: 'yyyy-MM-dd'}} - {{activity.endTime | date: 'yyyy-MM-dd'}}</td>
                <td>
                    <a [attr.href]="G.ENV_CONST.URI_YOUCE + '/start.html?accessToken=' + activity.simulatorToken" target="_blank" class="btn white" *ngIf="activity.simulatorToken">模拟登陆</a>
                    <span class="ml10px">{{activity.createUserName}}</span>
                </td>
                <td>
                    {{activity.status | name: 'ACTIVITY'}}
                </td>
                <td>
                    <button class="btn blue" (click)="pending(activity)" *ngIf="activity.status===2">暂停</button>
                    <button class="btn white" (click)="restore(activity)" *ngIf="activity.status===3">恢复</button>
                </td>
            </tr>
        </tbody>

    </table>

</div>